home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Interfaces & Libraries / interfaces / camera library.h next >
Encoding:
C/C++ Source or Header  |  1993-07-29  |  943 b   |  43 lines  |  [TEXT/MPS ]

  1. /* graphics libraries:
  2.     Perspective gxMapping generation routines
  3.     by Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga
  4.     Copyright 1987 - 1991 Apple Computer, Inc.  All rights reserved.    */
  5.  
  6. #pragma once
  7. #ifndef cameraLibraryIncludes
  8. #define cameraLibraryIncludes
  9. typedef struct
  10. {   fixed x;
  11.     fixed y;
  12.     fixed z;
  13. } point3D;
  14.  
  15. typedef struct
  16. {   fract x;
  17.     fract y;
  18.     fract z;
  19. } unit3D;
  20.  
  21. typedef struct
  22. {   point3D location;
  23.     point3D axis;
  24.     point3D zenith;
  25.     point3D observer;
  26.     gxMapping orientation;
  27. } camera;
  28.  
  29. typedef struct
  30. {   point3D u;
  31.     point3D v;
  32.     point3D origin;
  33. } patch;
  34.  
  35. void InitCamera(camera *);
  36. void UpdateCamera(camera *);
  37. void PatchToCameraMap(patch *, camera *, gxMapping *);
  38. fixed Unitize(point3D *, unit3D *);
  39. fract FracDot(unit3D *, unit3D *);
  40. void FracCross(unit3D *, unit3D *, unit3D *cross);
  41.  
  42. #endif
  43.